/*
 * Bootstrap Responsive Iframe Framework | BRIF
 * Material: http://bootstraptema.ru/stuff/plugins_bootstrap/improvement/brif/12-1-0-1221
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
(function($){$.fn.brif=function(options){var settings=$.extend({target:"iframe",wrapperClass:"brif"},options);$(window).on("load",function(){$(settings.target).each(function(){$(this).wrap('<div class="'+settings.wrapperClass+'"></div>');console.log("wrapper class added!")})});$(window).on("load resize",function(){$(settings.target).each(function(){var $oldHeight=$(settings.target).attr("height");var $oldWidth=$(settings.target).attr("width");var $newWidth=$(settings.target).parent().width();var $newHeight=$oldHeight/$oldWidth*$newWidth;$("."+settings.wrapperClass).find("iframe").css({height:$newHeight+"px",width:$newWidth+"px"});console.log("height/width values added!")})})}})(jQuery);